<template>
	<view class="today_pageheight">
		<view class="header_top ">
			<my-top title="个人信息" :isline="true" >
				<template slot="save">
					<view @click='submit'>保存</view>
				</template>
			</my-top>
		</view>
		<view class="content_add todaybg">
			
		<!-- 	<view class="addAvatars-item" @click="switchPic">
				<view class="addIcon">
					<image :src="templatesdata.imgUrl" mode=""> </image>
					<text class="iconfont todayxiangji change_icon"></text>
				</view>
			</view> -->
			<view class="oncetime">
				<view class="itemcnt">
					<view class="time1">
						<text class="title">头像</text>
						<!-- <image src="" mode=""></image> -->
					</view>
					<view class="Avatar" @click="switchPic">
						<text class="iconfont todaywode_1 fontSize"></text>
					</view>
				</view>
			</view>
			
			
			<view class="oncetime">
				<view class="itemcnt">
					<view class="time1">
						<text class="title">添加日历名称</text>
						<input class="titleinput" type="text" v-model="templatesdata.title" placeholder-class="placeholder" placeholder="给日历表起个名字" />
						<!-- <text v-if="formdul.showgendercheck">{{templatesdata.defaugender.name}}</text> -->
					</view>
					<!-- <view class="downup">
						<switch color="#6BDFA4" :checked="formdul.showgendercheck"  @change="btncheck(formdul.showgendercheck,1)" />
					</view> -->
				</view>
			</view>
			<!-- 选择性别 -->
			<view class="oncetime">
				<view class="itemcnt">
					<view class="time1" @click="btns(formdul.showgender,1)">
						<text class="title">选择性别</text>
						<text class="data" v-if="formdul.showgendercheck">{{templatesdata.defaugender.name}}</text>
					</view>
					<view class="downup">
						<switch color="#6BDFA4" :checked="formdul.showgendercheck" @change="btncheck(formdul.showgendercheck,1)" />
					</view>
				</view>
				<view :class="formdul.showgender == true?'chosetime':'chosetimehidden'">
					<view class="public">
						<view class="item" @click="btnchosename(item)" v-for="(item,index) in checkdata" :key='index'>
							<view class="item_box">
								<text :class="item.name==templatesdata.defaugender.name?'defauitem':''" class="borders"></text>
								<text>{{item.name}}</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 选择生日 -->
			<view class="oncetime">
				<view class="itemcnt">
					<view class="time1" @click="btns(formdul.showbrithday,2)">
						<text class="title">选择生日</text>
						<text class="data" v-if="formdul.showbrithdaycheck">{{templatesdata.pickerday}}</text>
					</view>
					<view class="downup">
						<switch color="#6BDFA4" :checked="formdul.showbrithdaycheck" @change="btncheck(formdul.showbrithdaycheck,2)" />
					</view>
				</view>
				<view :class="formdul.showbrithday == true?'chosetime':'chosetimehidden'">
					<view class="public">
						<lb-picker :inline='true' :columnNum='3' :show-mask='false' :show-header='false' mode='unlinkedSelector' :list='multiArray'
						 v-model="pickerday" @change='getColumnsInfo' ref="picker"></lb-picker>
					</view>
				</view>
			</view>
			<!-- 选择亲属 -->
			<view class="oncetime" v-show="isbaby">
				<view class="itemcnt">
					<view class="time1" @click="btns(formdul.showbaby,3)">
						<i class="iconfont todaychongfu "></i>
						<text class="title">请选择您与宝宝名称的关系</text>
						<text class="data" v-if="formdul.showbabycheck">{{templatesdata.defaubaby.name}}</text>
					</view>
					<view class="downup">
						<switch color="#6BDFA4" :checked="formdul.showbabycheck" @change="btncheck(formdul.showbabycheck,3)" />
					</view>
				</view>
				<view :class="formdul.showbaby == true?'chosetime':'chosetimehidden'">
					<view class="public">
						<view class="item" @click="btnchosebaby(item)" v-for="(item,index) in babydata" :key='index'>
							<view class=" item_box1" v-if="item.code !=9" :class="item.code==templatesdata.defaubaby.code?'defauitem':''">
								<text>{{item.name}}</text>
							</view>
							<view class="item_box1" v-else @click="btnaddmore">
								<text>更多</text>
							</view>
						</view>
					</view>
				</view>
			</view>
			<!-- 颜色 -->
			<view class="oncetime">
				<view class="itemcnt">
					<view class="time1" @click="btns(formdul.showgender,4)">
						<text class="title">日历表颜色</text>
						<text class="data bgcolor" v-if="templatesdata.color" :style="{'background-color':templatesdata.color}"></text>
						<!-- <input class="titleinput" type="text" v-model="templatesdata.title"  placeholder-class="placeholder" placeholder="请输入可爱的名字吧" /> -->
						<!-- <text v-if="formdul.showgendercheck">{{templatesdata.defaugender.name}}</text> -->
					</view>
					<!-- <view class="downup">
						<switch color="#6BDFA4" :checked="formdul.showgendercheck"  @change="btncheck(formdul.showgendercheck,1)" />
					</view> -->
				</view>
			</view>
			<!-- 添加日历共享成员 -->
			<!-- <view class="oncetime">
				<view class="itemcnt">
					<view class="time1">
						<i class="iconfont todayshouye "></i>
						<text class="title">添加日历共享成员</text>
					</view>
				</view>
				<view class="chosetime">
					<view class="public">
						<view class="list">
							<view class="list_item" @click="addmember(item)" v-for="(item,index) in memberlist" :key='index'>
								<view class="name">
								
									<image :src="item.url" mode=""></image>
									<text class="myfriderd">{{item.name}}</text>
								</view>
								<view class="juese" v-if="item.type ==1">
									管理员
								</view>
								<view class="juese1" v-else-if="item.type == 2">
									<text class="txt">编辑者</text>
									<text class="iconfont todaygengduo"></text>
								</view>
								<view class="juese1" v-else-if="item.type == 3">
									<text class="txt">订阅者</text>
									<text class="iconfont todaygengduo"></text>
								</view>
							</view>
						</view>
					</view>
				</view>
			</view> -->
			<my-select-color @close='closecolor' @change='changecolor' :isaddcolor='isaddcolor' ref='colors'></my-select-color>
		</view>
	</view>
</template>

<script>
	import LbPicker from '@/components/lb-picker';
	import {
		formModule
	} from '@/utils/formdata.js'
	var fromdata = new formModule();
	import {
		selectallrelation
	} from "@/api/api.js";
	import {
		mapState,
		mapActions,
		mapGetters,
		mapMutations
	} from 'vuex';
	import moment from "moment";

	export default {
		components: {
			LbPicker
		},
		data() {
			return {
				eparams: null,
				isbaby: false,
				isaddcolor: false,
				name: "",
				pickerday: [2000, 2, 20],
				memberlist: [{
						name: '张政',
						type: 1,
						url: '../../../static/img/asd.png'
					},
					{
						name: '张政',
						type: 2,
						url: '../../../static/img/asd.png'
					},
					{
						name: '张政',
						type: 1,
						url: '../../../static/img/asd.png'
					},
					{
						name: '张政',
						type: 3,
						url: '../../../static/img/asd.png'
					},
					{
						name: '张政',
						type: 2,
						url: '../../../static/img/asd.png'
					},
				],
				myProps: {
					label: 'text',
					value: 'id',
					children: 'child'
				},
				multiArray: [
					[{
							label: '2020',
							value: '2020'
						},
						{
							label: '2021',
							value: '2021'
						},
						{
							label: '2022',
							value: '2022'
						}
					],
					[{
							label: '8',
							value: '8'
						},
						{
							label: '9',
							value: '9'
						},
						{
							label: '10',
							value: '10'
						},
						{
							label: '11',
							value: '11'
						},
						{
							label: '22',
							value: '22'
						},
						{
							label: '33',
							value: '33'
						}
					],
					[{
							label: '8',
							value: '8'
						},
						{
							label: '9',
							value: '9'
						},
						{
							label: '10',
							value: '10'
						},
						{
							label: '11',
							value: '11'
						},
						{
							label: '22',
							value: '22'
						},
						{
							label: '23',
							value: '23'
						},
						{
							label: '24',
							value: '24'
						},
						{
							label: '25',
							value: '25'
						},
						{
							label: '26',
							value: '26'
						},
						{
							label: '27',
							value: '27'
						},
						{
							label: '28',
							value: '28'
						},
						{
							label: '29',
							value: '29'
						}
					]
				],
				babydata: [],
				checkdata: [{
						id: 1,
						name: '男'
					},
					{
						id: 2,
						name: '女'
					},
					{
						id: 0,
						name: '保密'
					},
				],
				formdul: {
					showgender: false,
					showgendercheck: false,
					showbrithdaycheck: false,
					showbrithday: false,
					showbabycheck: false,
					showbaby: false,

				},
				templatesdata: {
					imgUrl: '',
					defaugender: {
						id: 1,
						name: '男'
					},
					defaubaby: {
						code: 0,
						name: '爸爸1'
					},
					pickerday: '',
					title: '',
					color: '',
				}
			}
		},
		onShow() {
			let checkrelation = uni.getStorageSync('checkrelation');
			console.log('checkrelation', checkrelation)
			if (checkrelation) {
				this.templatesdata.defaubaby = {
					code: checkrelation.code,
					name: checkrelation.name
				}
			}
		},
		deactivated() {
			console.log('likai')
		},
		onLoad(val) {
			// 判断是修改还是添加
			this.eparams = val;
			console.log('值', val)
			if (val.type == 'updata') {
				this.editdata(val)
			} else {
				// 新增
			}
			this.initdata();
		},
		computed: {
			...mapState('initData', {
				// scheduleList: state => state.scheduleList,
				currentUser: state => state.currentUser,
			}),
		},
		methods: {
			...mapActions({
				updateSchedule: 'initData/updateSchedule',
				getIdSchedule: 'initData/getIdSchedule',
				addSchedule: 'initData/addSchedule',
				SetSchedule: 'initData/SetSchedule',
			}),

			async editdata(val) {
				let _that = this;

				// 查询当前用户的数据进行编辑
				let list = await this.getIdSchedule(val.id);
				console.log('编辑', list);
				let {
					color,
					id,
					logo,
					gender,
					name,
					relationId,
					birthday,
					relationName
				} = list;
				_that.templatesdata.id = id;
				if (color) {
					_that.templatesdata.color = color;
				}
				if (relationId) {
					_that.formdul.showbabycheck = true;
					_that.formdul.showbaby = true;
					_that.templatesdata.defaubaby = {
						code: relationId,
						name: relationName,
					};
				}
				if (gender) {
					_that.formdul.showgendercheck = true;
					_that.formdul.showgender = true;
					_that.templatesdata.defaugender = {
						id: gender,
						name: gender == 1 ? '男' : gender == 2 ? '女' : '保密'
					};
				}
				if (birthday) {
					_that.formdul.showbrithdaycheck = true;
					_that.formdul.showbrithday = true;
					_that.templatesdata.pickerday = birthday;
					console.log(birthday.split('-'));
					let data = birthday.split('-');
					_that.pickerday = [Number(data[0]), Number(data[1]), Number(data[2])]
				}
				_that.templatesdata.imgUrl = logo;
				_that.templatesdata.title = name;

				// this.templatesdata = {
				// 	color: "#A8A8A8",
				// 	defaubaby: {
				// 		code: relationId,
				// 		name: relationName,
				// 	},
				// 	defaugender: {
				// 		id:gender,
				// 		name:gender==1?'男':'女'
				// 	},
				// 	imgUrl: logo,
				// 	pickerday:birthday,
				// 	title:name,
				// }

				/**
				 *  addBy: ""
					addTime: null
					birthday: "2002-07-20"
					color: "#75E2EA"
					delFlag: "0"
					gender: 1
					id: 23
					lastUpdateBy: ""
					lastUpdateTime: null
					logo: "http://vendorzz.oss-cn-shanghai.aliyuncs.com/boke/fa787568-a601-4aa5-a3eb-95c0c2c41d1e.jpg"
					name: "mingzi"
					relationId: 1
					relationName: "爸爸"
					standby3: ""
					standby4: ""
					standby5: ""
				 * 
				 * 
				 * 
				 *  color: "#A8A8A8"
					defaubaby: Object //code: 8  name: "妈妈8"
					defaugender: Object  // id: 1   name: "女"
					imgUrl: ""
					pickerday: "2011-2-23"
					title: "xiaoming"
				 * 
				 * */

			},
			async initdata(val) {
				// 当前年
				let date = moment().format('YYYY');
				// 当前月有多少天
				let day = moment().endOf('month').format('DD'); //月末
				let arr1 = [],
					arr2 = [],
					arr3 = [];
				for (var year = 1960; year < date; year++) {
					arr1.push({
						label: year,
						value: year
					})
				}
				for (var i = 1; i <= 12; i++) {
					arr2.push({
						label: i,
						value: i
					})
				}
				for (var i = 1; i <= day; i++) {
					arr3.push({
						label: i,
						value: i
					})
				}


				this.multiArray[0] = arr1;
				this.multiArray[1] = arr2;
				this.multiArray[2] = arr3;

				// console.log('formData',formData.get('pageNum'))
				let result = await selectallrelation({
					pageNum: 1,
					pageSize: 9,
					userId: this.eparams.id
				});
				result = fromdata.formatDate(result);
				this.babydata = result.list;
				console.log('参数11', result, this.eparams);
				// if(relation.statusCode =200){

				// }
			},
			initday(date) {
				var arr3 = [];
				let day = moment(date, 'YYYY-MM').endOf('month').format('DD'); //月末
				for (var i = 1; i <= day; i++) {
					arr3.push({
						label: i,
						value: i
					})
				}
				this.multiArray[2] = arr3;
			},
			btnaddmore(val) {
				let {
					id,
					'defaubaby': {
						code
					}
				} = this.templatesdata;
				console.log(id, code)
				let obj = {
					code: code ? code : '',
					id
				};
				uni.navigateTo({
					url: './addrelation/addrelation?data=' + JSON.stringify(obj)
				})
			},
			// 提交
			async submit() {
				console.log('提交完成', this.templatesdata);
				let {
					title,
					color,
					pickerday,
					imgUrl,
					'defaugender': {
						id
					},
					defaubaby: {
						code
					}
				} = this.templatesdata;
				if (!title || title.trim().length < 1) {
					return uni.showToast({
						title: '请输入标题！',
						icon: 'none'
					})
				}
				let paramsobj = {
					userId: this.currentUser.userId,
					logo: imgUrl ? imgUrl : 'https://dss0.bdstatic.com/70cFvHSh_Q1YnxGkpoWK1HF6hhy/it/u=387639067,1599589691&fm=26&gp=0.jpg',
					name: title,
					gender: id ? id : '0',
					birthday: pickerday ? pickerday : '0',
					relationId: code ? code : '0',
					color: color ? color : '#178233',
					defined: '',
				}
				// return
				var result;
				if (this.eparams.type == 'updata') {
					paramsobj.id = this.eparams.id;
					if (!this.formdul.showbabycheck) {
						paramsobj.relationId = '0'
					}
					if (!this.formdul.showgendercheck) {
						paramsobj.gender = '0'
					}
					// paramsobj.defined = '张政'
					// if(!this.formdul.showbrithdaycheck){
					// 	paramsobj.birthday = '0'
					// }

					result = await this.updateSchedule(paramsobj)
					if (result) {
						this.SetSchedule()
						uni.showToast({
							title: '添加成功',
							icon: 'none',
							duration: 1500,
							success() {
								setTimeout(() => {
									uni.navigateBack({
										delta: 2
									})
								}, 1500)
							}
						})
					}
				} else {
					result = await this.addSchedule(paramsobj);
					if (result) {
						this.SetSchedule()
						uni.showToast({
							title: '添加成功',
							icon: 'none',
							duration: 1500,
							success() {
								setTimeout(() => {
									uni.navigateBack({
										delta: 1
									})
								}, 1500)
							}
						})
					}
				}

				console.log('添加', result);
			},
			changecolor(val) {
				this.templatesdata.color = val;
				this.isaddcolor = false;
			},
			addmember() {
				uni.navigateTo({
					url: './memberdetails/memberdetails'
				})
			},
			closecolor() {
				this.isaddcolor = false;
			},
			getColumnsInfo(e) {
				console.log(e)
				let data = e.value;
				let day = `${data[0]}-${ data[1]}`;
				this.initday(day);
				// 如果不满足年龄  显示关系
				let nowYear = moment().format('YYYY')
				if (nowYear - data[0] <= 12) {
					this.isbaby = true
				} else {
					this.isbaby = false
				}
				this.templatesdata.pickerday = `${data[0]}-${ data[1]}-${data[2]}`;

			},
			bindtemstart(e) {},
			btnchosename(val) {
				this.templatesdata.defaugender = val
			},
			btnchosebaby(val) {
				console.log(val)
				this.templatesdata.defaubaby = val
			},
			btncheck(val, state) {
				if (state == 1) {
					this.formdul.showgendercheck = !val;
					this.formdul.showgender = !val;
				} else if (state == 2) {
					this.formdul.showbrithdaycheck = !val;
					this.formdul.showbrithday = !val;
					// this.$refs.picker.show()
				} else if (state == 3) {
					this.formdul.showbabycheck = !val;
					this.formdul.showbaby = !val;
				}
			},
			btns(val, state) {
				// console.log('显示日程表')
				if (state == 1) {
					if (this.formdul.showgendercheck) {
						this.formdul.showgender = !val;
					}
				} else if (state == 2) {
					if (this.formdul.showbrithdaycheck) {
						this.formdul.showbrithday = !val;
					}
				} else if (state == 3) {
					if (this.formdul.showbabycheck) {
						this.formdul.showbaby = !val;
					}
				} else if (state == 4) {
					// this.$refs.colors.showcolor()
					this.isaddcolor = true;
				}
			},

		async switchPic() {
			// 临时文件 'file:///storage/emulated/0/DCIM/Camera/', //仅做示例用，非真正的文件路径
			console.log('图片');
			
			if(false){
				class imgFileToFileObj {
					constructor(arg) {
					    this.hahah = '里面的this'
					}
					//利用H5的IO方法 参考 官网地址 https://www.html5plus.org/doc/zh_cn/io.html#plus.io.FileReader
					getFileFromHIO(fileAllPath) {
						var promise = new Promise(function(resolve, reject) {
						console.log('图片路径',fileAllPath);
							plus.io.resolveLocalFileSystemURL(
								fileAllPath,
								function(entry) {
									console.log('entry',entry);
									// 可通过entry对象操作test.html文件 
									entry.file(function(file) {
										var fileReader = new plus.io.FileReader();
										console.log("getFile:" + JSON.stringify(file));
										fileReader.onloadend = function(evt) {
											// console.log("evt.target" + evt.target);
											// console.log("evt.target.result len = " +evt.target.result.length);
											// console.log("evt.target.result  = " +evt.target.result);
											//base64编码格式转file格式
											var aa = evt.target.result;
											var arr = aa.split(','),
												mime = arr[0].match(/:(.*?);/)[1],
												bstr = atob(arr[1]),
												n = bstr.length,
												u8arr = new Uint8Array(n);
											while (n--) {
												u8arr[n] = bstr.charCodeAt(n);
											}
											var fileResult = new File([u8arr], "filename.jpg", {
												type: mime
											});
											console.log('fileResult', fileResult);
											resolve(fileResult);
										}
									});
								},
								function(e) {
									console.log("Resolve file URL failed: " + e.message);
									reject(e)
								}
							);
						})
						return promise;
					}
					//利用Image对象
					getCodeFromImg(fileAllPath) {
						var promise = new Promise(function(resolve, reject) {
							var imga = new Image();
							imga.src = fileAllPath;
							imga.onload = function() {
								var canvas = document.createElement("canvas");
								canvas.width = imga.width;
								canvas.height = imga.height;
								var ctx = canvas.getContext("2d");
								ctx.drawImage(imga, 0, 0, imga.width, imga.height);
								var dataURL = canvas.toDataURL("image/png");
								var arr = dataURL.split(','),
									mime = arr[0].match(/:(.*?);/)[1],
									bstr = atob(arr[1]),
									n = bstr.length,
									u8arr = new Uint8Array(n);
								while (n--) {
									u8arr[n] = bstr.charCodeAt(n);
								}
								console.log(new File([u8arr], "mid_shot.jpg", {
									type: mime
								}));
								resolve(new File([u8arr], "mid_shot.jpg", {
									type: mime
								}));
							}
							imga.onerror = function() {
								reject('error，图片文件转file失败')
							}
						});
						return promise;
					}
					async doChange(imgFileStrList) {
						var FileList = new Array();
						console.log('图片查询',this.hahah);
						for (var i = 0; i < imgFileStrList.length; i++) {
							const time2 = await this.getFileFromHIO(imgFileStrList[i]);
							//const time2 = await this.getCodeFromImg(imgFileStrList[i]);
							console.log(time2);
							FileList.push(time2);
					
						}
						console.log(FileList);
					
						return FileList;
					}
				}
				
				
				var box = new imgFileToFileObj();
				var fileAllPath = 'file:///storage/emulated/0/DCIM/Camera/';
				var imgFileStrList = new Array();
				imgFileStrList.push(fileAllPath);
				// imgFileStrList.push(fileAllPath);
				// imgFileStrList.push(fileAllPath);
				
				// (async () => {
					var fileArrayOne = await box.doChange(imgFileStrList);
					console.log(' 我应该是最后的最后 fileArray = ' + fileArrayOne)
				// })()
				
				
				
				return
			}
			
			var that = this;
			uni.chooseImage({
				count: 6, //默认9
				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
				sourceType: ['album'], //从相册选择
				success: (res) => {
					console.log('res', JSON.stringify(res));
					uni.uploadFile({
						url: 'http://47.98.228.87:8088/v1/oss/uploadfile',
						filePath: res.tempFilePaths[0],
						name: 'file',
						formData: {
							'user': 'test'
						},
						success: function(uploadFileRes) {
							uploadFileRes = JSON.parse(uploadFileRes.data);
							if (uploadFileRes.data && uploadFileRes.code == 200) {
								that.templatesdata.imgUrl = uploadFileRes.data.url;
							} else {
								uni.showToast({
									title: '上传失败'
								})
							}
						},
						fail(uploadFileRes) {
							console.log('失败', uploadFileRes);
						}
					});
					// let data = await updataFileIfc({
					// 	file: res.tempFiles[0]
					// });
				}
			})
		}
	}
	}
</script>
<style lang="scss" scoped>
	.Avatar{
		width: 80rpx;
		height: 80rpx;
		background-color: #767679;
		text-align: center;
		line-height: 80rpx;
	}
	.fontSize{
		font-size: 45rpx;
		color: #E4E4E4;
	}
	.content_add {
		// margin-top:168rpx;
		// padding: 32rpx 16rpx 30rpx;
		background-color: $today-bg-color;
		height: 100%;
		width: 100%;
		// min-height: 94vh;
		.change_icon {
			width: 25rpx;
			height: 25rpx;
			padding: 2rpx;
			border: 2rpx solid #6BDFA4;
			border-radius: 50%;
			color: #6BDFA4;
			position: absolute;
			background-color: #FFFFFF;
			bottom: 0;
			right: -8rpx;
			display: flex;
			justify-content: center;
			box-sizing: 99;
			align-items: center;
		}

		.changeiconcolor {

			color: #FE94C0;
		}

		.addAvatars-item {
			position: relative;
			opacity: 1;
			margin-bottom: 32rpx;
			height: 100rpx;
			width: 100%;

			.addIcon {
				position: absolute;
				background: #aaffff;
				height: 100rpx;
				width: 100rpx;
				left: 50%;
				border-radius: 50%;
				transform: translateX(-50%);

				image {
					height: 100%;
					// width: 100rpx;
					border-radius: 50%;
				}

				text {}
			}
		}


		.content_top {
			width: 100%;
			height: 65rpx;
			display: flex;
			align-items: center;
			margin: 42rpx 0rpx;
			justify-content: space-between;

			.icon {
				margin: 0px 32rpx;
			}

			.addName {
				width: 90%;
				border-bottom: 1px solid #DEDEDE;
			}
		}

		/deep/ .lb-picker-content{
			background-color: $today-bg-color;
		}
		.oncetime {
			display: flex;
			padding: 16rpx;
			box-sizing: border-box;
			flex-direction: column;
			justify-content: center;
			width: 100%;
			min-height: 80rpx;
			background-color: $today-addSchedule-bg-color;
			opacity: 1;
			margin: 24rpx 0;
			.title {
				font-size: 28rpx;
				font-family: PingFang SC;
				font-weight: 400;
				// color: #121212;
				color: $today-addSchedule-text-color;
				opacity: 1;
				margin: 0 16rpx 0 18rpx;
			}

			.chosetimehidden {
				height: 0;
				opacity: 0.5;
				overflow: hidden;
				transition: all .3s;
			}

			.placeholder {
				font-size: 28rpx;
				color: #969799;

			}

			.chosetime {
				transition: all .3s;
				height: auto;
				opacity: 1;
				display: flex;
				flex-direction: column;
				// padding-top: 8rpx;
				border-top: 1rpx solid rgba(0, 0, 0, .3);

				.public {
					display: flex;
					justify-content: space-around;
					flex-flow: row wrap;
					color: $today-addSchedule-text-color;
					.list {
						display: flex;
						flex-flow: row wrap;
						width: 100%;

						.list_item {
							margin-top: 16rpx;
							display: flex;
							justify-content: space-between;
							height: 60rpx;
							align-items: center;
							// background: #ffff00;
							width: 100%;

							.name {
								height: 60rpx;
								display: flex;
								align-items: center;
								border-radius: 50%;
							}

							.myfriderd {
								height: 40rpx;
								font-size: 28rpx;
								font-family: PingFang SC;
								font-weight: 400;
								line-height: 42rpx;
								color: #666666;
								opacity: 1;
								margin-left: 16rpx;
							}

							image {
								width: 60rpx;
								height: 60rpx;
								background: #DEDEDE;
								border-radius: 50%;
								opacity: 1;

							}

							.juese {
								text-align: right;
								height: 40rpx;
								font-size: 28rpx;
								font-family: PingFang SC;
								font-weight: 400;
								line-height: 42rpx;
								color: #0AC074;
								opacity: 1;

							}

							.juese1 {
								text-align: right;
								// height: 40rpx;
								font-size: 28rpx;
								font-family: PingFang SC;
								font-weight: 400;
								// line-height: 42rpx;
								opacity: 1;
								display: flex;
								align-items: center;

								.txt {
									margin-right: 16rpx;
								}
							}
						}
					}

					.selectlist {
						display: flex;

						.selectitem {
							margin: 10rpx 20rpx;
						}
					}

					.item {
						text-align: center;
						width: 200rpx;
						height: 60rpx;
						border-radius: 4px;
						line-height: 60rpx;
						margin-top: 16rpx;
						font-size: 28rpx;
						opacity: 1;

						.item_box {
							display: flex;
							width: 100%;
							align-items: center;
							justify-content: center;
						}

						.item_box1 {
							display: flex;
							border-radius: 10rpx;
							justify-content: center;
							width: 200rpx;
							flex-flow: row wrap;
							font-size: 28rpx;
							background: rgba(10, 192, 116, .1);
						}

						.borders {
							display: flex;
							border: 1rpx solid #646566;
							border-radius: 50%;
							width: 20rpx;
							height: 20rpx;
							margin-right: 20rpx;
						}

						.defauitem {
							background: rgba(10, 192, 116, 1);
							border: 1rpx solid rgba(10, 192, 116, 1);
							// padding: 5rpx;
							// box-sizing: border-box;
						}
					}

				}

				// 我的日程表
				.childlist {
					padding: 16rpx 25rpx 0;
					border-top: 1rpx solid #696969;
					display: flex;
					justify-content: center;

					.childbox {
						display: flex;
						flex-flow: row wrap;

						// justify-content:flex-start;
						.defauboxitem {
							background-color: #696969;
							border-radius: 15rpx;
						}

						.boxitem {
							margin-top: 16rpx;
							align-self: flex-start;
							width: 33%;
							display: flex;

							.txt {
								margin-left: 10rpx;
							}
						}
					}
				}

				.daytime {
					display: flex;
					justify-content: center;
					color: #315FFA;
				}

				.vdatabox {
					width: 120rpx;
					height: 50rpx;
					opacity: 1;
					border-radius: 10rpx;
					color: #666666;
				}

				.defultbox {
					background: #0AC074;
					color: #FFFFFF;
					width: 120px;
				}

				.timedata {

					padding: 16rpx 70rpx;
					display: flex;
					display: flex;
					align-items: center;
					justify-content: center;

				}

				.centertxt {
					margin: 0 48rpx;
					font-size: 24rpx;
				}

				.itemdata {
					text-align: center;
					line-height: 50rpx;
					background: rgba(10, 192, 116, .1);
					opacity: 1;
					border-radius: 10rpx;
					width: 120rpx;
					height: 50rpx;
					position: relative;

					.timesolid {
						position: absolute;
						left: 50%;
						transform: translateX(-50%);
						// border: 1rpx solid red;
					}

					.timeinput {
						text-align: right;
						// text-indent: 2rem;
						line-height: 50rpx;
						height: 50rpx;
						padding: 0 6rpx;
						letter-spacing: 10rpx;
					}
				}

				.borderbottom {
					// border-bottom: 1rpx solid #666;
					background-color: rgba(10, 192, 116, .1);
				}

				.addmethod {
					margin: 16rpx 100rpx;
					box-sizing: border-box;
					display: flex;
					justify-content: space-between;

					text {
						width: 120rpx;
						height: 50rpx;
						text-align: center;
						line-height: 50rpx;
						border-radius: 10rpx;

					}
				}
			}

			.text {
				color: #666;
				height: 40rpx;
				line-height: 40rpx;
				margin-right: 10rpx
			}

			.column {
				border-bottom: 1rpx solid #696969;
			}

			.defultbox {
				width: 32rpx;
				height: 32rpx;
			}

			.itemcnt {
				display: flex;
				justify-content: space-between;
				padding-bottom: 8rpx;

				.time1 {
					display: flex;
					align-items: center;
					flex: 2;

					.bgcolor {
						width: 20rpx;
						height: 20rpx;
						border-radius: 50%;
					}

					.titleinput {
						flex: 2;
						padding-top: 2rpx;
						color: $today-add-textColor;
						text-align: right;
					}
				}

				.data {
					height: 100%;
					display: block;
					height: 46rpx;
					line-height: 50rpx;
				}

				.time2 {
					flex: 1;
					display: flex;
					justify-content: center;
					display: flex;
					align-items: center;
				}

				.downup {}
			}
		}
		.oncetime:nth-child(1){
			min-height: 128rpx;
		}
		.oncetitle {

			border-radius: 15rpx;
			width: 718rpx;
			height: 161rpx;
			background: #FFFFFF;
			opacity: 1;
			margin-top: 16rpx;

			.myinput {
				height: 80rpx;
				padding: 0 16rpx;
				border-bottom: 1rpx solid #323233;
				box-sizing: border-box;
			}

			.box {

				height: 88rpx;
				display: flex;
				justify-content: space-around;
				align-items: center;
				width: 100%;

				text {
					margin-left: 10rpx;
				}

				.itemicon {
					display: flex;
				}

				.itemcolor {
					display: flex;
					align-items: center;
				}
			}
		}

	}
	.today_pageheight{
		width: 100%;
		height: 100%;
		background-color: $today-bg-color;
	}
</style>
